package com.leo.foodmaster.commons.enums;

import lombok.Getter;

/**
 * <p>
 * 系统枚举信息类
 * </p>
 *
 * @author ：Leo
 * @since ：2021-06-25 17:26
 */
@Getter
public enum MsgEnum {
    /**
     * 系统枚举信息类
     */
    SERVICE_SUCCESS(200, "服务正常"),
    SERVICE_ERROR(500, "服务错误"),

    SYSTEM_SUCCESS(10200, "系统正常"),
    SYSTEM_ERROR(10500, "系统错误"),
    NOT_FOUND(404,"数据不存在"),
    TOKEN_ERROR(500, "登录失效，请重新登录"),

    SERVICE_NOT_EXIST_ERROR(20404, "服务不存在"),
    SERVICE_UNKNOWN_ERROR(20000, "服务未知错误"),

    REQUEST_SUCCESS(200, "操作成功！"),
    REQUEST_SUCCESS_PASSWORD(200, "添加成功,密码为手机后6位！"),
    REQUEST_NODATA(201, "没有数据"),

    LOGIN_SUCCESSFUL(30200, "登录成功"),
    LOGIN_ERROR(30201, "用户名或密码错误"),

    ID_ILLEGAL(501, "非法ID，请验证"),
    PARAMETER_ERROR(501, "参数错误"),
    CAPTCHA_ERROR(501, "验证码错误"),
    AUTH_CAPTCHA_FREQUENCY(501, "验证码未超时1分钟，不能发送"),

    USER_ACCOUNT_EXISTED(400, "账号已经存在，请重新填写！"),
    USER_PHONE_EXISTED(400, "手机号已经存在，请重新填写！"),
    USER_EMAIL_EXISTED(400, "邮箱已经存在，请重新填写！"),
    ;

    private final int code;
    private final String msg;

    MsgEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
